/*
 * Copyright (C) 2012 POAS.VSTU
 */

package model;

import java.util.ArrayList;
import java.util.Calendar;
import java.util.Date;

/** Класс-регистратор событий GameEvent. */
public class GameEventListenerRegistrator implements GameEventListener {

    public int cardsMovedCounter = 0;
    public int cardsExtractedCounter = 0;
    public int cardsAddedCounter = 0;
    public ArrayList<GameEvent> eventLog = new ArrayList<>();

    public ArrayList<Long> cardsMovedStamp = new ArrayList<>();
    public ArrayList<Long> cardsExtractedStamp = new ArrayList<>();
    public ArrayList<Long> cardsAddedStamp = new ArrayList<>();

    @Override
    public void cardsMoved(GameEvent e) {
        cardsMovedCounter++;
        eventLog.add(e);
        cardsMovedStamp.add(Calendar.getInstance().getTimeInMillis());

    }

    @Override
    public void cardsExtracted(GameEvent e) {
        cardsExtractedCounter++;
        eventLog.add(e);
        cardsExtractedStamp.add(Calendar.getInstance().getTimeInMillis());
    }

    @Override
    public void cardsAdded(GameEvent e) {
        cardsAddedCounter++;
        eventLog.add(e);
        cardsAddedStamp.add(Calendar.getInstance().getTimeInMillis());
    }

    @Override
    public void userActionWaitStart() {
        //throw new UnsupportedOperationException("Not supported yet.");
    }

    @Override
    public void allCardsInStack() {
        //To change body of implemented methods use File | Settings | File Templates.
    }

}
